//
// Created by admin on 2020/7/17.
//

#ifndef DATASTRUCTURE_DEMO_H
#define DATASTRUCTURE_DEMO_H
#define MAXSTACKLENGTH 100
#include <stdio.h>
#include <stdlib.h>
typedef struct {
    int *base;
    int *top;
    int stacksize;
}SqStack;
//顺序表
//创建栈
SqStack InitStack();
//判断栈是否为空
int StackEmpty(SqStack S);
//计算栈长度
int StackLength(SqStack S);
//清空栈
int ClearStack(SqStack *S);
//销毁栈
int DestroyStack(SqStack *S);
//入栈
int Push(SqStack *S,int data);
//出栈
int Pop(SqStack *S);
//获取栈顶元素
int GetTop(SqStack S);
#endif //DATASTRUCTURE_DEMO_H
